#ifndef __ARCH_H__
#define __ARCH_H__

#include <types.h>
#include <multiboot.h>
#include <cpu.h>

#define CHECK_FLAG(flags,bit)	((flags) & (1 << (bit)))

extern uint32_t new_cr3;
extern uint32_t old_cr3;

typedef struct {
    multiboot_info_t *mbi;
    uint32_t free_mem_region;
    uint32_t mem_size;
    uint32_t kernel_pdir;
} sysinfo_t;

void arch_panic(const char *);
multiboot_info_t *arch_getmbi(void);
void cpu_idle(void);

extern void syscall_ret(void);
extern void syscall_entry(void);

#endif  /* __ARCH_H__ */
